﻿/*------------------------------------------------
// File Description: WorkOrderLable DataBase Entity
// Author:			 Crane
// Create Time:		 2020-06-11 16:26:55
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 工单标签
    /// </summary>
    [Table(nameof(WorkOrderLable))]
    public class WorkOrderLable : BaseEntity
    {
        private string _orderNo = string.Empty;
        private string _workOrderNo = string.Empty;
        private string _serialNum = string.Empty;
        private string _borderBarCode = string.Empty;
        private string _nameplate = string.Empty;
        private string _currentTag = string.Empty;
        private string _energyTag = string.Empty;
        private string _mark = string.Empty;
        private string _pallNumTag = string.Empty;
        private string _frChart = string.Empty;
        private string _oBAData = string.Empty;

        #region Public Property

        ///<Summary>
        /// 订单号
        ///</Summary>
        public string OrderNo
        {
            get { return string.IsNullOrWhiteSpace(_orderNo) ? string.Empty : _orderNo; }
            set { _orderNo = value; }
        }

        ///<Summary>
        /// 工单号
        ///</Summary>
        public string WorkOrderNo
        {
            get { return string.IsNullOrWhiteSpace(_workOrderNo) ? string.Empty : _workOrderNo; }
            set { _workOrderNo = value; }
        }

        /// <summary>
        /// 模板ID
        /// </summary>
        public int TemplateId { get; set; }

        ///<Summary>
        /// 序列号
        ///</Summary>
        public string SerialNum
        {
            get { return string.IsNullOrWhiteSpace(_serialNum) ? string.Empty : _serialNum; }
            set { _serialNum = value; }
        }

        ///<Summary>
        /// 边框条码
        ///</Summary>
        public string BorderBarCode
        {
            get { return string.IsNullOrWhiteSpace(_borderBarCode) ? string.Empty : _borderBarCode; }
            set { _borderBarCode = value; }
        }

        ///<Summary>
        /// 铭牌
        ///</Summary>
        public string Nameplate
        {
            get { return string.IsNullOrWhiteSpace(_nameplate) ? string.Empty : _nameplate; }
            set { _nameplate = value; }
        }

        ///<Summary>
        /// 电流标签
        ///</Summary>
        public string CurrentTag
        {
            get { return string.IsNullOrWhiteSpace(_currentTag) ? string.Empty : _currentTag; }
            set { _currentTag = value; }
        }

        ///<Summary>
        /// 能源标签
        ///</Summary>
        public string EnergyTag
        {
            get { return string.IsNullOrWhiteSpace(_energyTag) ? string.Empty : _energyTag; }
            set { _energyTag = value; }
        }

        ///<Summary>
        /// 唛头
        ///</Summary>
        public string Mark
        {
            get { return string.IsNullOrWhiteSpace(_mark) ? string.Empty : _mark; }
            set { _mark = value; }
        }

        ///<Summary>
        /// 托盘号标签
        ///</Summary>
        public string PallNumTag
        {
            get { return string.IsNullOrWhiteSpace(_pallNumTag) ? string.Empty : _pallNumTag; }
            set { _pallNumTag = value; }
        }

        ///<Summary>
        /// FR报表
        ///</Summary>
        public string FrChart
        {
            get { return string.IsNullOrWhiteSpace(_frChart) ? string.Empty : _frChart; }
            set { _frChart = value; }
        }

        ///<Summary>
        /// OBA数据
        ///</Summary>
        public string OBAData
        {
            get { return string.IsNullOrWhiteSpace(_oBAData) ? string.Empty : _oBAData; }
            set { _oBAData = value; }
        }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 
        /// </summary>
        public virtual DbSet<WorkOrderLable> WorkOrderLables { get; set; }
    }
}